package com.bit101.components
{
	import flash.display.Bitmap;
	import flash.display.DisplayObjectContainer;
	
	public class ImageCheckBox extends CheckBox
	{
		public function ImageCheckBox(parent:DisplayObjectContainer=null, xpos:Number=0, ypos:Number=0, label:String="", defaultHandler:Function=null)
		{
			super(parent, xpos, ypos, label, defaultHandler);
		}
		override public function draw():void
		{
			/*
			
			_back.graphics.clear();
			_back.graphics.beginFill(Style.BACKGROUND);
			_back.graphics.drawCircle(5, 5, 5);
			_back.graphics.endFill();
			
			_button.graphics.clear();
			_button.graphics.beginFill(Style.BUTTON_FACE);
			_button.graphics.drawCircle(5, 5, 3);
			
			*/
			
			_label.x = 25;
			_label.y = (10 - _label.height) / 2;
			_label.text = "<font color='#666666' size='16'>" + _labelText + "</font>";
			
			_label.draw();
			_width = 20;
			_height = 10;
		}
		public function setEmbedBitmap(backCls:Class,btnCls:Class):void{
			_back.addChild(new backCls());
			var btn:Bitmap = new btnCls()
			_button.addChild(btn);
			btn.x = 4;
			btn.y = 4;
		}
	}
}